'abucomponent.Monkey by Belimoth
Strict
Import abuentity



Class EntityComponent<I>
	Field owner:IEntity
	
	Method Tie:Void(owner:IEntity)
		Self.owner = owner
	End
	
	Method Finalize:Void()
	
	End
End



Interface INull End



Class NullComponent Extends EntityComponent<INull> Implements IPosition, ISize, IVelocity, IPhysics, ISprite, IRender, ISchedule, IEventHandler
	Method X:Int() Property Return 0 End
	Method X:Void(xNew:Int) Property End
	Method Y:Int() Property Return 0 End
	Method Y:Void(yNew:Int) Property End
	Method Position:Position() Property Return Null End
	Method SetPosition:Void(xNew:Int, yNew:Int) End
	Method DistanceTo:Float(other:IPosition) Return 0 End
	Method AngleTo:Float(other:IPosition)Return 0 End
	
	Method xVelocity:Float() Property Return 0 End
	Method xVelocity:Void(xVelocityNew:Float) End
	Method yVelocity:Float() Property Return 0 End
	Method yVelocity:Void(yVelocityNew:Float) End
	Method xAcceleration:Float() Property Return 0 End
	Method xAcceleration:Void(xAccelerationNew:Float) End
	Method yAcceleration:Float() Property Return 0 End
	Method yAcceleration:Void(yAccelerationNew:Float) End
	Method xMaxVelocity:Float() Property Return 0 End
	Method yMaxVelocity:Float() Property Return 0 End
	Method SetMaxVelocity:Void(xMaxVelocityNew:Float, yMaxVelocityNew:Float) End
	Method xDisplacement:Int() Property Return 0 End
	Method yDisplacement:Int() Property Return 0 End

	Method Width:Int() Property Return 0 End
	Method Width:Void(widthNew:Int) Property End
	Method SetWidth:Void(widthNew:Int, align:Int = ALIGN_LEFT) End
	Method Height:Int() Property Return 0 End
	Method Height:Void(heightNew:Int) Property End
	Method SetHeight:Void(heightNew:Int, align:Int = ALIGN_TOP) End
	Method SetSize:Void(widthNew:Int, heightNew:Int, align:Int = ALIGN_LEFT|ALIGN_TOP) End
	Method GetEdge:Int(direction:Int) Return 0 End
	
	Method Move:Void(x:Int, y:Int) End
	
	Method CurrentAnimation:String() Property Return "" End
	Method NextAnimation:String() Property Return "" End
	Method LoopCount:Int() Property Return 0 End
	Method HandleX:Float() Property Return 0 End
	Method HandleY:Float() Property Return 0 End
	Method SetHandle:Void(x:Float, y:Float) End
	Method AnimationSheet:AbuAnimationSheet() Property Return Null End
	Method AnimationSheet:Void(animationSheet:AbuAnimationSheet) Property End
	Method SetAnimationSheet:Void(path:String, frameWidth:Int, frameHeight:Int) End
	Method SetRate:Void(rate:Float) End
	Method AddAnimation:Void(name:String, sequence:Int[], frameDuration:Int, loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method AddAnimation:Void(name:String, sequence:Int[], frameDuration:Int[], loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method AddAnimation:Void(name:String, start:Int, sequence:Int[], frameDuration:Int, loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method AddAnimation:Void(name:String, start:Int, sequence:Int[], frameDuration:Int[], loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method AddAnimation:Void(name:String, subAnimations:String[], loop:Bool = True, flipX:Bool = False, flipY:Bool = False) End
	Method PlayAnimation:Void(name:String, reset:Bool = True, rate:Float = 1.0) End
	Method QeueAnimation:Void(name:String, reset:Bool = True, rate:Float = 1.0) End
	Method PlayNextAnimation:Void() End
	Method OnAnimationLoop:Void(animation:String) End
	Method OnAnimationEnd:Void(animation:String) End
	Method AddOffset:Void(name:String, offsetX:Int[], offsetY:Int[], cumulative:Bool = False) End
	Method AddDisplacement:Void(name:String, displaceX:Int[], displaceY:Int[]) End
	Method _Displace:Void(x:Int, y:Int) End
	Method Draw:Void(x:Int, y:Int, rotation:Float = 0, scaleX:Float = 1, scaleY:Float = 1) End
	
	Method Alpha:Float() Property Return 0 End
	Method Alpha:Void(alpha:Float)	Property End
	Method ZIndex:Int() Property Return 0 End
	Method ZIndex:Void(zIndex:Int) Property End
	Method Render:Void() End
	
	Method AddTween:Void(name:String, value:Float, duration:Int, flags:Int = TWEEN_DEFAULT) End
	Method PauseTween:Void(name:String) End
	Method ResumeTween:Void(name:String) End
	Method RemoveTween:Void(name:String) End
	Method ClearTweens:Void() End
	Method OnTweenComplete:Void(name:String) End
	Method AddTimer:Void(name:String, timeTargetRelative:Int = 0) End
	Method PauseTimer:Void(name:String) End
	Method ResumeTimer:Void(name:String) End
	Method RemoveTimer:Void(name:String) End
	Method ClearTimers:Void() End
	Method OnTimerComplete:Void(name:String)End
	
End